package com.authine.cloudpivot.app.openapi.domain.openapi;

import com.authine.cloudpivot.app.openapi.domain.gateway.AppConfigValueGateway;
import org.springframework.stereotype.Component;

/**
 * @author lifuchun
 */

@Component
public class OpenApi {

    private final AppConfigValueGateway appConfigValueGateway;


    private AppConfigValue appConfigValue;

    private UserInfoValue userInfoValue;

    public OpenApi(AppConfigValueGateway appConfigValueGateway) {
        this.appConfigValueGateway = appConfigValueGateway;
    }


    public AppConfigValue getAppConfigValue(String appKey) {
        return appConfigValueGateway.getAppConfigValue(appKey);
    }

    public UserInfoValue getUserInfoValue(String userId,String corpId) {
        return appConfigValueGateway.getUserInfoValue(userId,corpId);
    }

    public void recordTokenUserInfo(String userId, String appKey) {
        appConfigValueGateway.recordTokenUserInfo(userId, appKey);
    }
}
